Skip to content

feat(milvus2): add auto search mode for search strategy inference#673

Draft
kaijchen wants to merge 1 commit intocloudwego:mainfrom
kaijchen:milvus2-auto
Draft

feat(milvus2): add auto search mode for search strategy inference#673
kaijchen wants to merge 1 commit intocloudwego:mainfrom
kaijchen:milvus2-auto

Conversation

@kaijchen
Copy link
Copy Markdown
Contributor

@kaijchen kaijchen commented Jan 28, 2026

What type of PR is this?

feat

Check the PR title.

  • This PR title match the format: <type>(optional scope): <description>
  • The description of this PR title is user-oriented and clear enough for others to understand.
  • Attach the PR updating the user documentation if the current PR requires user awareness at the usage level.

(Optional) Translate the PR title into Chinese.

feat(milvus2): 添加 auto 搜索模式,支持推断搜索策略

(Optional) More detailed description for this PR(en: English/zh: Chinese).

en:
This PR introduces an Auto Search Mode for the Milvus2 retriever that automatically determines the optimal search strategy based on configuration:

Key Changes:

  1. New Auto Search Mode (Default)

    • Both VectorField and SparseVectorField configured -> Hybrid Search (RRF reranker)
    • Only VectorField configured -> Dense (Approximate) Search
    • Only SparseVectorField configured -> Sparse Search
    • SearchMode in RetrieverConfig is now optional; defaults to auto mode
  2. Search Mode Refactoring

    • Moved all search mode implementations from search_mode/ subpackage to main milvus2/ package
    • Original search_mode/ package contains deprecated aliases for backward compatibility
  3. SearchParams Builder

    • Added SearchParams field to RetrieverConfig for per-field search parameters
    • New NewSearchParams() builder for fluent parameter construction

zh(optional):
本PR为Milvus2检索器引入了自动搜索模式,根据配置自动选择最优搜索策略:

  • 同时配置VectorField和SparseVectorField -> 混合搜索
  • 仅配置VectorField -> 稠密向量搜索
  • 仅配置SparseVectorField -> 稀疏向量搜索

(Optional) Which issue(s) this PR fixes:

(optional) The PR that updates user documentation:

@kaijchen kaijchen changed the title feat(milvus2): add auto search mode for automatic search strategy inference feat(milvus2): add auto search mode for search strategy inference Jan 28, 2026
@shentongmartin shentongmartin added C-enhancement This is a PR that adds a new feature or fixes a bug. D-integration Domain: This is an issue related to 3rd party service integrations, excluding LLM providers labels Mar 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C-enhancement This is a PR that adds a new feature or fixes a bug. D-integration Domain: This is an issue related to 3rd party service integrations, excluding LLM providers

Development

Successfully merging this pull request may close these issues.

2 participants